import AsyncComponent from '../component/router/asyncComponent'
// import Index from '../pages/Index'
const Index = AsyncComponent(()=>import('../pages/Index'));
// import Home from '../pages/Home'
const Home = AsyncComponent(()=>import('../pages/Home'));
// import User from '../pages/User'
const User = AsyncComponent(()=>import('../pages/User'));
// import NotFond from '../pages/other/NotFond'
const NotFond = AsyncComponent(()=>import('../pages/other/NotFound'));
// import ReduxTest from '../pages/test/ReduxTest'
const ReduxTest = AsyncComponent(()=>import('../pages/test/ReduxTest'));
// import AntdTest from '../pages/test/AntdTest'
const AntdTest = AsyncComponent(()=>import('../pages/test/AntdTest'));
const AxiosTest = AsyncComponent(()=>import('../pages/test/AxiosTest'));
const router = [
  {
    path: '/index',//首页默认加载的页面
    componentName: Index,
    exact: false, //是否为严格模式 默认true。注意：本次封装对于有子路由的，exact一律设置为false（详见App.js匹配规则）
    name: 'Index',
    routes: [
      {
        path: '/index/home',
        componentName: Home,
        name: 'Home'
      },
      {
        path: '/index/user',
        componentName: User,
        name: 'User'
      }
    ]
  },
  {
    path: '/redux-test',
    componentName: ReduxTest,
    name: 'ReduxTest'
  },
  {
    path: '/antd-test',
    componentName: AntdTest,
    name: 'AntdTest'
  },
  {
    path: '/axios-test',
    componentName: AxiosTest,
    name: 'AxiosTest'
  },
  {
    path: '/404',
    componentName: NotFond,
    name: 'NotFond'
  },
];
export default router








